* Clean up
clear all

/* Set working directory: please set your own
cd "~/Dropbox/JOP third submission/JOP replication/"
*/

* Open dataset

use 01_data/whole_spain.dta, clear

regr pp_voteshare post##ciutadella if period > 1
est store reverse_bandwagon_1

regr pp_voteshare post##ciutadella
est store reverse_bandwagon_2

* Make table
esttab reverse_bandwagon_1 reverse_bandwagon_2 using 03_tables/tablee1.tex, tex se replace mtitles ("2014-2019" "2009-2019") keep(_cons 1.post 1.ciutadella 1.post#1.ciutadella) coeflabels (_cons "Constant" 1.post "2019" 1.ciutadella "Ciutadella" 1.post#1.ciutadella "2019 x Ciutadella") star(* 0.10 ** 0.05 *** 0.01)
